<div id="blog">
	<table class="columnHeader" width="100%" cellspacing="0" cellpadding="5">
		<tr>
			<td>
			<div class="columnTitle">
				我的博客</div>
			<div class="btnEdit">
			    <% if isHost %>
				<%=link_to "写新博客",:controller=>"blog",:action=>"write",:id=>@params[:id]%>
				<% end %>
            </div>
			</td>
		</tr>
	</table>
	<% if @blogs.size == 0 %>
	<div class="noBlogAlert">
    <%=
        @alertMessage="暂时没有写博客！"
        render(:partial=>"/alertPanel")
    %>
    </div>
    <% else %>
    <% for blog in @blogs %>
	<table class="blogContent" cellspacing="0" cellpadding="5">	   
        <tr>
    		<td align="left" class="dateTime">
    		    <%=link_to blog.title,:controller=>:blog,:action=>:show,:id=>@params[:id],:blog_id=>blog.id %>
                <%= isPrivate(blog.isPrivate)%>
                <br>
                <%=blog.writeDatetime.strftime("%Y-%m-%d %I:%M%p") %> 
            </td>
            <% if isHost %>
            <td width="60" align="right" valign="top">		        
                    <%=link_to "修改",:controller=>"blog",:action=>"edit",:id=>@params[:id],:blog_id=>blog.id %>
                    <%=link_to "删除",:controller=>"blog",:action=>"delete",:blog_id=>blog.id,:id=>@params[:id]%>
            </td>
            <% end %>
        </tr>	   
	</table>
	<% end %>
	<% end %>
	<div class="pager">
		<ul>
			<% for page in @blog_pages %>
                <%=
                if page==@blog_pages.current()
                    "<li class='currentPage'>#{page.number}</li>"
                else
                    "<li><a href = '/home/index/#{@params[:id]}?page=#{@params[:page]}&blogPage=#{page.number}' >#{page.number}</a></li>"
                end
                %>
            <% end %>
		</ul>
	</div>
</div>